#pragma once

#include "../Core/Core.h"

#include <limits>

#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>

namespace krt {

	class KRT_API KRTMath {
	public:
		static double Drand48();

		static void Srand48(unsigned int i);

		static glm::vec3 RandomUnitSphere();

		static glm::vec2 RandomUnitDisk();

		static float MagnitudeSq(const glm::vec3& v) {
			return v.x * v.x + v.y * v.y + v.z * v.z;
		}

		static float Magnitude(const glm::vec3& v) {
			return glm::sqrt(MagnitudeSq(v));
		}

		static glm::vec3 Lerp(const glm::vec3& a, const glm::vec3& b, const glm::vec3& x);

		const static float FloatMax;

	private:
		static unsigned long long seed;

	};

}